package com.sjy.dao;


import com.sjy.dao.model.CodeNode;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CodeNodeRepository extends MongoRepository<CodeNode, String> {


    @Query(value="{'_id':?0}")
     CodeNode getById(String id);

    @Query(value="{'parentId':?0}")
    List<CodeNode> getCodeNodeList(String parentId);

    @Query(value="{'classFullName':?0}")
    List<CodeNode> getCodeByClassName(String classFullName);


}
